/**
 * @date 3:14:26 PM
 * EducationSchool.java
 * Administrator
 * TODO
 */
package com.qs.education.bean.entity;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.Getter;
import lombok.Setter;

/**
 * @class EducationSchool：学校实体	
 * @author Warren
 * @description
 * @date Oct 31, 2018 
 */
@Entity
@Table(name="education_school")
@Getter
@Setter
public class EducationSchool {
	
	@Id
	@Column(name="id" ,unique=true,nullable=false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	@Column(name="name",nullable=false)
	private String name;
	private String province;
	private String city;
	private String area;
	
	@OneToMany(mappedBy="school")
	@JsonIgnoreProperties(value = { "school","groups","grade","clazz"})
	private List<EducationStudent> students = new ArrayList<EducationStudent>();
	
	@OneToMany(mappedBy="school")
	@JsonIgnoreProperties(value = { "group","school","groups","subject","homeWorkList"})
	private List<EducationTeacher> teachers = new ArrayList<EducationTeacher>();
}
